import java.util.Scanner;

public class capitalNumber {
    public static void main(String[] args) {
        int money;
        Scanner sc = new Scanner(System.in);
        while (true) {
            money = sc.nextInt();
            if (money >= 0 && money <= 9999999) {
                break;
            } else {
                System.out.println("金额无效");
            }
        }
        String capitalnumber = "";

        while (money != 0) {
            int ge = money % 10;
            capitalnumber = getcapitalnumber(ge) + capitalnumber;
            money = money / 10;

        }
        //System.out.println(capitalnumber);
        int count = 7 - capitalnumber.length();
        for (int i = 0; i < count; i++) {
            capitalnumber = "零" + capitalnumber;
        }
        //System.out.println(capitalnumber);
        String result = "";
        String[] arr = {"佰","拾","万","仟","佰","拾","元"};
        for (int i = 0; i < capitalnumber.length(); i++) {
            char c = capitalnumber.charAt(i);
            //System.out.print(c+arr[i]);
            result = result + c + arr[i];
        }
        System.out.println(result);

    }

    public static String getcapitalnumber(int number) {
        String[] arr = {"零", "壹", "贰", "叁", "肆", "伍", "陆", "柒", "捌", "玖"};
        return arr[number];
    }
}
